<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>注册页面</title>
	<style>
		table{
			width: 400px;
			margin: 100px auto;
		}
		table,tr,td{
			border: 1px solid #ccc;
		}
		table{
			border-collapse: collapse;
		}
	</style>
</head>
<body>
	<form action="" method="get">
		<table>
			<caption>
				<h1>注册页面</h1>
			</caption>
			<tr>
				<td>姓名：</td>
				<td><input type="text" name="name"></td>
			</tr>
			<tr>
				<td>性别：</td>
				<td>
					<input type="radio" name="sex" value="男">男
					<input type="radio" name="sex" value="女">女
				</td>
			</tr>
			<tr>
				<td>年龄：</td>
				<td><input type="number" name="age"></td>
			</tr>
			<tr>
				<td>籍贯：</td>
				<td><input type="text" name="jg"></td>
			</tr>
			<tr>
				<td>兴趣爱好：</td>
				<td>
					<input type="checkbox" name="like[]" value="唱歌">唱歌
					<input type="checkbox" name="like[]" value="看书">看书
					<input type="checkbox" name="like[]" value="旅游">旅游
				</td>
			</tr>
			<tr>
				<td>学历：</td>
				<td>
					<select name="xl">
						<option>高中</option>
						<option>本科</option>
						<option>研究生</option>
					</select>
				</td>
			</tr>
			<tr style="text-align: center;">
				<td colspan="2"><input type="submit" name="sub" value="提交"></td>
			</tr>
		</table>
	</form>
<?php
if (isset($_GET['sub'])) {
	echo "姓名:" . $_GET['name'] . '<br />';
	echo "性别:" . $_GET['sex'] . '<br />';
	echo "年龄:" . $_GET['age'] . '<br />';
	echo "籍贯:" . $_GET['jg'] . '<br />';
	echo "学历:" . $_GET['xl'] . '<br />';
	$arr = $_GET['like'];
	echo "爱好为：";
	foreach ($arr as $value) {
		echo $value . "    ";
	}
}
?>
</body>
</html>